Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vite-runner): 支持通过 importNativeComponent 定义原生组件 #17041

Merged
merged 93 commits into from
Dec 16, 2024

Conversation

ZakaryCode
Copy link
Contributor

这个 PR 做了什么? (简要描述所做更改)

支持在 vite-runner 中,识别通过 importNativeComponent 方法支持的原生组件

  • 支持在普通文件中引入 config
  • usingComponents 类型支持传入导入组件文件的 exportName
  • 支持通过 importNativeComponent 的方式为原生组件提供类型
export const Title = importNativeComponent<typeof import('../../components/title').Title>('../../static/components/title/index', 'title', 'Title')

function Index () {
  return <View><Title title="Hello world!" /><View>
}

这个 PR 是什么类型? (至少选择一个)

  • 新功能(Feature)
  • TypeScript 类型定义修改(Typings)
  • 代码风格更新(Code style update)

这个 PR 涉及以下平台:

  • 所有小程序
  • 鸿蒙(harmony)

ZakaryCode and others added 30 commits June 17, 2024 23:55
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.54%. Comparing base (fe38f34) to head (29f91f9).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17041   +/-   ##
=======================================
  Coverage   58.54%   58.54%           
=======================================
  Files         467      467           
  Lines       27120    27120           
  Branches     5947     5931   -16     
=======================================
  Hits        15878    15878           
+ Misses       9790     9768   -22     
- Partials     1452     1474   +22     
Flag Coverage Δ
taro-cli 73.67% <ø> (ø)
taro-runtime 59.87% <ø> (ø)
taro-web 52.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 16 files with indirect coverage changes

@tutuxxx tutuxxx added this to the 4.0.9 milestone Dec 16, 2024
@ZakaryCode ZakaryCode merged commit 84e1f62 into main Dec 16, 2024
38 checks passed
@ZakaryCode ZakaryCode deleted the feat/harmony branch December 16, 2024 08:14
This was referenced Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typings Area - TypeScript Typings 相关 T-harmony Target - 编译到 Harmony
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants